package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 窄化请求
 * @author stone
 * @date 2021/12/30 14:45
 */
@Controller
@RequestMapping("user")
public class UserController {

    //@RequestMapping("user/login")
    @RequestMapping("login")  //  → user/login
    @ResponseBody
    public String login() {
        return "login";
    }

    //@RequestMapping("user/register")
    @RequestMapping("register")
    @ResponseBody
    public String register() {
        return "register";
    }

    //@RequestMapping("user/modify")
    @RequestMapping("modify")
    @ResponseBody
    public String modify() {
        return "modify";
    }

    @RequestMapping("goodbye/*")
    @ResponseBody
    public String goodbye() {

        return "byebye";
    }

}
